package com.yuand.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.beans.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @ProjectName: boot_easyexcel
 * @PackageName: com.yuand.entity
 * @ClassName: Commission
 * @Author: yuand
 * @Date 2021/9/30 15:55
 * @Week: 星期四
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("f_commission")
@ContentRowHeight(45)
@HeadRowHeight(60)
public class Commission implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelProperty(value = {"序号","序号"},index = 0)
    @ColumnWidth(10) //列宽
    @TableField(exist = false)
    private String orderNum;    //该字段是在excel导出的时候使用，表前面加序号


    @ExcelIgnore
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ExcelIgnore
    @TableField("order_id")
    @ColumnWidth(15)
    private Integer orderId;

    @ExcelProperty(value = { "订单编号"}, index = 2)
    @TableField("order_code")
    @ColumnWidth(65)
    private String orderCode;

    @ExcelProperty(value = { "客户编号"}, index = 1)
    @TableField("customer_code")
    @ColumnWidth(15)
    private String customerCode;

    @ExcelIgnore
    @TableField("customer_name")
    private String customerName;

    @ExcelIgnore
    @TableField("customer_id")
    private Integer customerId;


    @ExcelProperty(value = { "签约额", "信号灯"}, index = 3)
    @ColumnWidth(15)
    @TableField("qian_yue_cost1")
    private BigDecimal qianYueCost1;

    @ExcelProperty(value = { "签约额", "杆件"}, index = 4)
    @ColumnWidth(15)
    @TableField("qian_yue_cost2")
    private BigDecimal qianYueCost2;

    @ExcelIgnore
    @TableField("tui_guang_cost1")
    private BigDecimal tuiGuangCost1;

    @ExcelIgnore
    @TableField("tui_guang_cost2")
    private BigDecimal tuiGuangCost2;

    @ExcelIgnore
    @TableField("you_hui_cost1")
    private BigDecimal youHuiCost1;

    @ExcelIgnore
    @TableField("you_hui_cost2")
    private BigDecimal youHuiCost2;

    @ExcelIgnore
    @TableField("yun_fei_cost1")
    private BigDecimal yunFeiCost1;

    @ExcelIgnore
    @TableField("yun_fei_cost2")
    private BigDecimal yunFeiCost2;

    @ExcelProperty(value = { "核算额", "信号灯"}, index = 5)
    @ColumnWidth(15)
    @TableField("he_suan_cost1")
    private BigDecimal heSuanCost1;

    @ExcelProperty(value = {"核算额", "杆件"}, index = 6)
    @ColumnWidth(15)
    @TableField("he_suan_cost2")
    private BigDecimal heSuanCost2;

    @ExcelProperty(value = { "实际运费", "信号灯"}, index = 7)
    @ColumnWidth(15)
    @TableField("trans_cost1")
    private BigDecimal transCost1;

    @ExcelProperty(value = { "实际运费", "杆件"}, index = 8)
    @ColumnWidth(15)
    @TableField("trans_cost2")
    private BigDecimal transCost2;

    @NumberFormat("#.##%")
    @ExcelProperty(value = { "执行提成比例", "信号灯"}, index = 9)
    @ColumnWidth(15)
    @TableField("ti_cheng_bi_li1")
    private BigDecimal tiChengBiLi1;

    @NumberFormat("#.##%")
    @ExcelProperty(value = { "执行提成比例", "杆件"}, index = 10)
    @ColumnWidth(15)
    @TableField("ti_cheng_bi_li2")
    private BigDecimal tiChengBiLi2;

    @ExcelProperty(value = { "应付提成金额（元）", "信号灯"}, index = 11)
    @ColumnWidth(15)
    @TableField("ti_cheng_cost1")
    private BigDecimal tiChengCost1;

    @ExcelProperty(value = { "应付提成金额（元）", "杆件"}, index = 12)
    @ColumnWidth(15)
    @TableField("ti_cheng_cost2")
    private BigDecimal tiChengCost2;


    @ExcelProperty(value = { "业务经理提成合计（元）"}, index = 13)
    @ColumnWidth(20)
    @TableField(exist = false)
    private BigDecimal tiChengCost;

    @ExcelIgnore
    @TableField("price_cost1")
    private BigDecimal priceCost1;

    @ExcelIgnore
    @TableField("price_cost2")
    private BigDecimal priceCost2;

    @ExcelIgnore
    @TableField("update_time")
    private Date updateTime;

    @ExcelIgnore
    @TableField("add_time")
    private Date addTime;

    @ExcelIgnore
    private String note;

    @ExcelIgnore
    @TableField("settlement_time")
    private String settlementTime;

    @ExcelIgnore
    @TableField("add_account")
    private String addAccount;

    @ExcelIgnore
    @TableField("add_name")
    private String addName;

    @ExcelProperty(value = {"业务经理"}, index = 14)
    private String reviser;//业务经理

    /**
     * 订单签约额
     */
    @ExcelIgnore
    @TableField("order_cost")
    private BigDecimal orderCost;

    /**
     * 已销货总签约额
     */
    @TableField("delivery_cost")
    private BigDecimal deliveryCost;



}
